package com.clementheliou.cheliou.dal.dao.base;

import org.hibernate.dialect.Dialect;

/**
 * This interface declares common methods for application DAO's.
 * 
 * @author Clément HELIOU (clement.heliou@gmail.com)
 * @since 1.0
 */
public interface BaseDAO {

	/**
	 * Clears the current session.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @since 1.0
	 */
	void clearSession();

	/**
	 * Gets the dialect used in the current session.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @return the resulting dialect.
	 * @see {@link Dialect}.
	 * @since 1.0
	 */
	Dialect getDialect();

	/**
	 * Flushes the current session.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @since 1.0
	 */
	void flushSession();
}
